package channel

import (
	"github.com/flaravel/quanlaolao/app/models"
	"github.com/flaravel/quanlaolao/pkg/types"
)

type Channel struct {
	models.BaseModel
	Name 	 string `gorm:"type:varchar(255);not null;" valid:"name" json:"text"`
	Logo  	 string `gorm:"type:varchar(255);not null;" valid:"logo" json:"icon"`
	Sort  	 int 	`gorm:"sort" json:"-"`
}

// GetStringID 获取 ID 的字符串格式
func (c Channel) GetStringID() string {
	return types.Uint64ToString(c.ID)
}